package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 学校地址锁定确认表
 *
 * @author zhang
 * @since 2025-01-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_school_lock_audit")
@Schema(name = "EduSchoolLockAudit", title = "学校地址锁定确认表", description = "学校地址锁定确认表实体类")
public class EduSchoolLockAudit extends Model<EduSchoolLockAudit> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "schoolLockAuditId", description = "主键")
    @TableId(value = "school_lock_audit_id", type = IdType.ASSIGN_ID)
    private Long schoolLockAuditId;

    @Schema(name = "addressId", description = "edu_address_tree的主键")
    @TableField(value = "address_id")
    private Long addressId;

    @Schema(name = "areaName", description = "组织名称")
    @TableField(value = "area_name")
    private String areaName;

    @Schema(name = "areaType", description = "行政区划类型 ")
    @TableField(value = "area_type")
    private String areaType;

    @Schema(name = "rate", description = "级别")
    @TableField(value = "rate")
    private Integer rate;

    @Schema(name = "parentId", description = "上级address_id")
    @TableField(value = "parent_id")
    private Long parentId;

    @Schema(name = "schoolId", description = "edu_school关联主键-org_id")
    @TableField(value = "school_id")
    private String schoolId;

    @Schema(name = "schoolNature", description = "学校性质0.公办 1.民办")
    @TableField(value = "school_nature")
    private String schoolNature;

    @Schema(name = "schoolCategory", description = "学校类别")
    @TableField(value = "school_category")
    private String schoolCategory;

    @Schema(name = "schoolNum", description = "学校代码")
    @TableField(value = "school_num")
    private String schoolNum;

    @Schema(name = "schoolName", description = "学校名称")
    @TableField(value = "school_name")
    private String schoolName;

    @Schema(name = "areaCode", description = "学校行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "addressName", description = "完整的地址名称")
    @TableField(value = "address_name")
    private String addressName;

    @Schema(name = "auditStatus", description = "确认状态，0未确认，1通过，2不通过,3确认失败")
    @TableField(value = "audit_status")
    private String auditStatus;

    @Schema(name = "auditUser", description = "确认用户")
    @TableField(value = "audit_user")
    private String auditUser;

    @Schema(name = "auditTime", description = "确认时间")
    @TableField(value = "audit_time")
    private Date auditTime;

    @Schema(name = "auditMassage", description = "确认消息")
    @TableField(value = "audit_massage")
    private String auditMassage;

    @Schema(name = "lockStatus", description = "锁定状态，0未锁定，1已锁定，2锁定失败")
    @TableField(value = "lock_status")
    private String lockStatus;

    @Schema(name = "lockUser", description = "锁定用户")
    @TableField(value = "lock_user")
    private String lockUser;

    @Schema(name = "lockTime", description = "锁定时间")
    @TableField(value = "lock_time")
    private Date lockTime;

    @Schema(name = "lockMassage", description = "锁定消息")
    @TableField(value = "lock_massage")
    private String lockMassage;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", description = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.schoolLockAuditId;
    }
}
